package com.dianping.cat.home.graph.entity;

import com.dianping.cat.home.graph.BaseEntity;
import com.dianping.cat.home.graph.IVisitor;
import java.util.LinkedHashMap;
import java.util.Map;





public class Item
  extends BaseEntity<Item>
{
  private String m_id;
  private String m_view;
/* 17 */   private Map<String, Segment> m_segments = new LinkedHashMap();





/* 23 */   public Item(String id) { this.m_id = id; }




/* 28 */   public void accept(IVisitor visitor) { visitor.visitItem(this); }


  public Item addSegment(Segment segment) {
/* 32 */     this.m_segments.put(segment.getId(), segment);
/* 33 */     return this;
  }


  public boolean equals(Object obj) {
/* 38 */     if (obj instanceof Item) {
/* 39 */       Item _o = (Item)obj;

/* 41 */       if (!equals(getId(), _o.getId())) {
/* 42 */         return false;
      }

/* 45 */       return true;
    }

/* 48 */     return false;
  }


/* 52 */   public Segment findSegment(String id) { return (Segment)this.m_segments.get(id); }



/* 56 */   public String getId() { return this.m_id; }



/* 60 */   public Map<String, Segment> getSegments() { return this.m_segments; }



/* 64 */   public String getView() { return this.m_view; }



  public int hashCode() {
/* 69 */     int hash = 0;

/* 71 */     return hash * 31 + ((this.m_id == null) ? 0 : this.m_id.hashCode());
  }




  public void mergeAttributes(Item other) {
/* 78 */     assertAttributeEquals(other, "item", "id", this.m_id, other.getId());

/* 80 */     if (other.getView() != null) {
/* 81 */       this.m_view = other.getView();
    }
  }


/* 86 */   public Segment removeSegment(String id) { return (Segment)this.m_segments.remove(id); }


  public Item setId(String id) {
/* 90 */     this.m_id = id;
/* 91 */     return this;
  }

  public Item setView(String view) {
/* 95 */     this.m_view = view;
/* 96 */     return this;
  }

  public Item() {}
}


/* Location:              /Users/hanfei/Documents/apache-tomcat-9.0.24/webapps/cat/WEB-INF/classes/!/com/dianping/cat/home/graph/entity/Item.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       1.0.7
 */